from django.urls import path
from django.contrib.auth import views as auth_views
from . import views

urlpatterns = [
    # 登录登出
    path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),
    path('logout/', auth_views.LogoutView.as_view(next_page='login'), name='logout'),
    
    # 用户注册
    path('register/', views.RegisterView.as_view(), name='register'),
    
    # 用户资料
    path('profile/', views.ProfileView.as_view(), name='profile'),
    
    # 密码修改
    path('password_change/', auth_views.PasswordChangeView.as_view(
        template_name='users/password_change.html',
        success_url='/users/password_change/done/'
    ), name='password_change'),
    path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(
        template_name='users/password_change_done.html'
    ), name='password_change_done'),
] 